Access2Web 1.2

If Empty tag.

<§ IF_EMPTY="" ELSE="" [Databasefield] END="" §>

This tag makes it possible to take special action in case a database field is empty. Let us look at an axample:

Say you have a pricelist on your website. For some reason you don´t have a price ready for a certain product. Instead of the price being missing you would like to inform the customer on when the price will be available. For this purpose you will use the If Empty tag. Right click on the database field and press the If Empty icon.

In this case the following tag would be generated:

<§ IF_EMPTY="" ELSE="" [UnitPrice] END="" §>

This tag consists of four parts:

IF_EMPTY="" Anything you put inside the quotations will appear in the HTML code if the database field is empty.

ELSE="" Anything you put inside the quotations will appear in the HTML code right before the content of the database field if the database field is not empty.

[UnitPrice] The database field (in this case UnitPrice) will be put out whether it is empty or not.

END="" Anything you put inside the quotations will appear in the HTML code immediately after the database field.

To obtain our goal of informing the customer regarding missing prices, we would insert the If Empty tag like this:

<§ IF_EMPTY="Sorry, no price on this product. It will be availabe within 2-3 days." ELSE="$" [UnitPrice] END=" plus shipping and handling." §>